Optimal. Leaf size=206 \[ -\frac {(-1)^{3/4} a^{5/2} (20 i A+23 B) \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}+\frac {(4-4 i) a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.46, antiderivative size = 206, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3675, 3682,
3625, 211, 3680, 65, 223, 209} \begin {gather*} -\frac {(-1)^{3/4} a^{5/2} (23 B+20 i A) \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}+\frac {(4-4 i) a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3675
Rule 3680
Rule 3682
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx &=\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}+\frac {1}{2} \int \frac {(a+i a \tan (c+d x))^{3/2} \left (\frac {1}{2} a (4 A-i B)+\frac {1}{2} a (4 i A+7 B) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}+\frac {1}{2} \int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {3}{4} a^2 (4 A-3 i B)+\frac {1}{4} a^2 (20 i A+23 B) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}+\left (4 a^2 (A-i B)\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx-\frac {1}{8} (a (20 A-23 i B)) \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}-\frac {\left (a^3 (20 A-23 i B)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{8 d}-\frac {\left (8 a^4 (i A+B)\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}-\frac {\left (a^3 (20 A-23 i B)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{4 d}\\ &=-\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}-\frac {\left (a^3 (20 A-23 i B)\right ) \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}\\ &=\frac {\sqrt [4]{-1} a^{5/2} (20 A-23 i B) \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{4 d}-\frac {(4+4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (4 A-7 i B) \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {i a B \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2}}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 6.53, size = 394, normalized size = 1.91 \begin {gather*} \frac {(a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \left (\frac {\sqrt {2} e^{-2 i (c+d x)} \sqrt {-\frac {i \left (-1+e^{2 i (c+d x)}\right )}{1+e^{2 i (c+d x)}}} \left (128 (A-i B) \log \left (e^{i (c+d x)}+\sqrt {-1+e^{2 i (c+d x)}}\right )-\sqrt {2} (20 A-23 i B) \left (\log \left (1-3 e^{2 i (c+d x)}-2 \sqrt {2} e^{i (c+d x)} \sqrt {-1+e^{2 i (c+d x)}}\right )-\log \left (1-3 e^{2 i (c+d x)}+2 \sqrt {2} e^{i (c+d x)} \sqrt {-1+e^{2 i (c+d x)}}\right )\right )\right )}{\sqrt {-1+e^{2 i (c+d x)}} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}}}-\frac {8 \sqrt {\sec (c+d x)} (\cos (2 c)-i \sin (2 c)) \sqrt {\tan (c+d x)} (4 A-9 i B+2 B \tan (c+d x))}{(\cos (d x)+i \sin (d x))^2}\right )}{32 d \sec ^{\frac {7}{2}}(c+d x) (A \cos (c+d x)+B \sin (c+d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 565 vs. \(2 (164 ) = 328\).
time = 0.12, size = 566, normalized size = 2.75
method | result | size |
derivativedivides | \(\frac {\sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (\sqrt {\tan }\left (d x +c \right )\right ) a^{2} \left (-9 i B \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a +18 i B \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-4 B \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )+8 i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a +12 A \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a -8 A \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+16 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a -8 \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a +16 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \right )}{8 d \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}}\) | \(566\) |
default | \(\frac {\sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (\sqrt {\tan }\left (d x +c \right )\right ) a^{2} \left (-9 i B \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a +18 i B \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}-4 B \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )+8 i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a +12 A \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a -8 A \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+16 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a -8 \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a +16 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \right )}{8 d \sqrt {i a}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}}\) | \(566\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 849 vs. \(2 (152) = 304\).
time = 0.76, size = 849, normalized size = 4.12 \begin {gather*} -\frac {16 \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (i \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left ({\left (-i \, A - B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-i \, A - B\right )} a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 16 \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (-i \, \sqrt {2} \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left ({\left (-i \, A - B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-i \, A - B\right )} a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) + 2 \, \sqrt {2} {\left ({\left (4 \, A - 11 i \, B\right )} a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} + {\left (4 \, A - 7 i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (\sqrt {2} {\left ({\left (20 i \, A + 23 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (20 i \, A + 23 \, B\right )} a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + 2 i \, \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (20 i \, A + 23 \, B\right )} a^{2}}\right ) - \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (\sqrt {2} {\left ({\left (20 i \, A + 23 \, B\right )} a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (20 i \, A + 23 \, B\right )} a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - 2 i \, \sqrt {\frac {{\left (-400 i \, A^{2} - 920 \, A B + 529 i \, B^{2}\right )} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (20 i \, A + 23 \, B\right )} a^{2}}\right )}{8 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {5}{2}} \left (A + B \tan {\left (c + d x \right )}\right )}{\sqrt {\tan {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{\sqrt {\mathrm {tan}\left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________